package com.zut.wx.handler;

public enum WxChatMsgTypeEnums {
    SUBSCRIBE("event.subscribe","用户关注了"),
    TEXT_MSG("text","接受用户文本信息");
    private String type;
    private String msg;

     WxChatMsgTypeEnums(String type,String msg){
        this.msg=msg;
        this.type=type;
    }

    public static WxChatMsgTypeEnums getEnumByType(String type){
        for (WxChatMsgTypeEnums wxChatMsgTypeEnum:
             WxChatMsgTypeEnums.values()) {
            if (wxChatMsgTypeEnum.type.equals(type)){
                return wxChatMsgTypeEnum;
            }

        }
        return null;
    }
}
